/*
 * runnable.h
 *
 *  Created on: 2013. 3. 16.
 *      Author: jaty
 */

#ifndef RUNNABLE_H_
#define RUNNABLE_H_

class runnable
{
public:
    virtual ~runnable() {}
    static void *run_thread(void *args)
    {
        runnable *prunnable = static_cast<runnable*>(args);
        prunnable->run();

        return 0;
    }
protected:
    virtual void run() = 0; //derived class must implement this!
};


#endif /* RUNNABLE_H_ */
